from selenium.webdriver.chrome.webdriver import WebDriver
from libs.common.browser import browser_init
from libs.utils.log import logger

class Web_driver(object):
    driver = None
    @classmethod
    def open_browser(cls) -> WebDriver:
        url = 'https://demo.meiscrm.com/#/login'
        logger.info('打开浏览器')
        cls.driver = browser_init()  # 调用一个方法,浏览器初始化
        cls.driver.get(url)
        return cls.driver


if __name__ == '__main__':
    Web_driver()
    print('driverrrr', Web_driver().driver)